Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better duplicate key stats during index generation #30829

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

jeffwashington
Copy link
Contributor

Problem

See #30711

At startup, scan storages to populate index. We can easily identify pubkeys that are in multiple slots (duplicates).
There are metrics on this, but they have misleading names.
More importantly, the duplicate list needs to include the first slot we encounter that contains a given duplicate pubkey so that clean will pick it up correctly.

Summary of Changes

Rename and add metrics.
When we find the first duplicate, also mark as duplicate the first item that was already added which has now become a duplicate.

Fixes #

Copy link
Contributor

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@codecov
Copy link

codecov bot commented Mar 21, 2023

Codecov Report

Merging #30829 (1c0d6d0) into master (ce0e23f) will decrease coverage by 0.1%.
The diff coverage is 100.0%.

@@            Coverage Diff            @@
##           master   #30829     +/-   ##
=========================================
- Coverage    81.3%    81.3%   -0.1%     
=========================================
  Files         726      726             
  Lines      203495   203509     +14     
=========================================
+ Hits       165608   165616      +8     
- Misses      37887    37893      +6     

@jeffwashington jeffwashington merged commit 2216647 into solana-labs:master Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants